home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
comm2
/
gfrq29mb.lha
/
GFreq2.9MeBBS
/
update.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-11-05
|
1KB
|
57 lines
/* Modifies v2.3 .acf-files to v2.4 */
/* Start with "rx update.rexx <path to your accounting directory> */
/* Must end with a '/' or a ':' */
/* Ex: "rx update.rexx Mail:GFreq/Accounts/ */
/* Tank's to Tomas Karlsson 2:201/328.2@fidonet */
IF ~SHOW('L','rexxsupport.library') THEN
ADDLIB('rexxsupport.library',0,-30,0)
PARSE ARG dir
last = RIGHT(dir,1)
IF last ~= '/' THEN ok=1
IF ok =1 & last = ':' THEN ok=0
IF ok = 1 THEN DO
SAY 'You forgot "/" or ":"in arg.'
EXIT
END
SAY "Hey you, don't go for coffe. I don't like coffe."
files = SHOWDIR(dir,F,'-')
DO UNTIL files = ''
PARSE VAR files file '-' files
if right(file,4) = '.acf' then do
IF ~OPEN(f,dir''file,'R') THEN DO
SAY "Can't read" dir''file
EXIT
END
IF ~OPEN(n,'ram:'file,'W') THEN DO
SAY "Can't write to Ram:"file
EXIT
END
SAY 'Procesing 'dir''file
DO WHILE ~EOF(f)
line = READLN(f)
IF line = '' THEN BREAK
WRITELN(n,LEFT(SPACE(SUBWORD(line,1,3),1,'*')'*'STRIP(SUBWORD(line,4,4),'B','"')'*',51,' '))
END
CALL CLOSE(f)
CALL CLOSE(n)
SAY 'Copy Ram:'file 'to' dir
ADDRESS COMMAND 'COPY Ram:'file TO DIR''FILE
END
END
ADDRESS COMMAND 'DELETE ram:*.acf'
SAY sourceline(2) /* Dont remove this*/